import Vue from 'vue'
import Vuex from 'vuex'
Vue.use(Vuex)

const state = {
   count:0 
}
const mutations = {
   inmutations:(state,el) =>{
    state.count = state.count+1
   },
   dnmutations:(state) =>{
    state.count = state.count-1
   }
}
const actions = {
    getactions:({commit})=>commit("inmutations"),
    postactions:({commit})=>commit("dnmutations")    
} 
const getters = {
    eventOll:state => state.count%2===0 ? 'even':'odd'
}


export default new Vuex.Store({
    state,
    mutations,
    actions,
    getters
})